import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';

// req
export class LoginReqDto {
  @ApiProperty({
    required: true,
    description: '调用wx.login()后获得的code',
  })
  js_code: string;
}

// res

export class LoginResSuccessDto {
  @ApiProperty({
    required: true,
  })
  success: boolean;

  @ApiProperty({
    required: true,
  })
  token: string;
}

export class LoginResFailDto {
  @ApiProperty({
    required: true,
    default: false,
  })
  success: boolean;

  @ApiPropertyOptional()
  message: string;
}
